const Redis = require('ioredis');
const RedisConfig = require('../config/redis_conf');
// const Bluebird = require('bluebird');

// Bluebird.promisifyAll(Redis.prototype);
let redisClient = new Redis(RedisConfig);
let redisPublisher = new Redis(RedisConfig);
let redisSubscriber = new Redis(RedisConfig);
console.log('Redis is loading.');

module.exports =  {
    redisClient: redisClient,
    redisPublisher: redisPublisher,
    redisSubscriber: redisSubscriber,
};